<style>
    .profile-avatar-container {
        position: relative;
        width: 100px;
        margin: 0 auto;
    }

    .profile-avatar-container .profile-user-img {
        width: 100px;
        height: 100px;
    }

    .profile-avatar-container .profile-avatar-text {
        display: none;
    }

    .profile-avatar-container:hover .profile-avatar-text {
        display: block;
        position: absolute;
        height: 100px;
        width: 100px;
        background: #444;
        opacity: .6;
        color: #fff;
        top: 0;
        left: 0;
        line-height: 100px;
        text-align: center;
    }

    .profile-avatar-container button {
        position: absolute;
        top: 0;
        left: 0;
        width: 100px;
        height: 100px;
        opacity: 0;
    }
</style>
<div class="row animated fadeInRight">
    <div class="col-md-12">
        <div class="box box-primary">
            <div class="panel-heading">
                {:__('会员配置')}
            </div>
            <div class="panel-body">
                <form id="update-form" role="form" data-toggle="validator" method="POST"
                    action="{:url('level.config/edit_level')}">
                    <input type="hidden" class="form-control" id="id" name="row[id]"
                    value="{$configss.id|htmlentities}" />
                    {:token()}
                    <div class="box-body box-profile">
                        <div class="form-group">
                            <label for="vip_name" class="control-label">{:__('会员名称')}:</label>
                            <input type="text" class="form-control" id="vip_name" name="row[vip_name]"
                                value="{$configss.vip_name|htmlentities}" />
                        </div>
                        <div class="form-group">
                            <label for="open_vip" class="control-label">{:__('开通会员金额')}:</label>
                            <input type="number" class="form-control" id="open_vip" name="row[open_vip]"
                                value="{$configss.open_vip|htmlentities}" />
                            <input type="hidden" class="form-control" id="id" name="row[id]"
                                value="{$configss.id|htmlentities}" />
                        </div>
                        <div class="form-group">
                            <label for="day" class="control-label">{:__('开通有效期(天)')}:</label>
                            <input type="number" class="form-control" id="day" name="row[day]"
                                value="{$configss.day|htmlentities}" />
            
                        </div>
                        <div class="form-group row">
                            <label class="control-label col-xs-12">{:__('会员权益')}:</label>
                            <div class="col-xs-12">
                                <table class="table fieldlist" data-template="tpl" data-name="row[json]" id="two-table">
                                    <tr>
                                        <td>{:__('商品')}</td>
                                        <td>{:__('数量')}</td>
                                        <td width="100"></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5"><a href="javascript:;"
                                                class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i>
                                                {:__('Append')}</a></td>
                                    </tr>
                                </table>
                                <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
                                <textarea name="row[json]" class="form-control hidden" cols="30"
                                    rows="5">{$configss.json|htmlentities}</textarea>
                                <script id="tpl" type="text/html">
                                <tr class="form-inline">
                                    <td><input type="text" name="<%=name%>[<%=index%>][id]" class="form-control selectpage" data-source="goods/index" data-field="title" value="<%=row.id%>" placeholder="商品"/></td>
                                    <td><input type="number" name="<%=name%>[<%=index%>][content]" class="form-control" size="50" value="<%=row.content%>" placeholder="数量"/></td>
                                    <td>
                                        <!--下面的两个按钮务必保留-->
                                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                    </td>
                                </tr>
                            </script>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="tags" class="control-label">{:__('权益标签')}:</label>
                            <input type="text" class="form-control" id="tags" name="row[tags]" data-role="tagsinput" 
                                value="{$configss.tags|htmlentities}" />
                        </div>
                        <div class="form-group">
                            <button type="submit" class="btn btn-primary">{:__('Submit')}</button>
                            <button type="reset" class="btn btn-default">{:__('Reset')}</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>

    </div>
</div>